﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameName1
{
    class XnaProjectileDecorator : XnaGameObjectDecorator
    {
        private Projectile _projectile;

        public XnaProjectileDecorator(Projectile projectile, Texture2D sprite)
        {
            _projectile = projectile;
            Sprite = sprite;
        }

        public void RegisterObserver(IProjectileObserver observer)
        {
            _projectile.RegisterObserver(observer);
        }

        public override Vector2 Velocity
        {
            get { return Projectile.Velocity; }
            set { Projectile.Velocity = value; }
        }

        public override Vector2 Position
        {
            get { return Projectile.Position; }
            set { Projectile.Position = value; }
        }

        public Projectile Projectile
        {
            get { return _projectile; }
        }

        public override void HandleHit()
        {
            Projectile.HandleHit();
        }

        public override void Move()
        {
            Projectile.Move();
        }
    }
}
